import Vue from 'vue'
import App from './App'

import $config from './common/config.js'
import $api from './common/common.js'
// import $func from './common/func.js'
import $store from './common/store.js'
import uView from '@/uni_modules/uview-ui'
Vue.use(uView)
// #ifdef H5 || MP-360
// uni.canIUse = function(name) {
// 	return name in uni;
// }
// #endif

// 测试阶段
$config.debug = process.env.NODE_ENV === 'development';

if (!$config.debug) {
	// 取消日志打印功能
	console.log = () => { }
}

// 注册当前环境 
$api.register_env((env) => {
	Vue.prototype.$env = env;
});
import * as api from '@/api/api.js'
Vue.prototype.$apis = api
import * as apis from '@/api/apis.js'
Vue.prototype.$apiss = apis

import BASE_URL from '@/api/env.js' //引入接口共用地址
Vue.prototype.$API_BASE_URL= BASE_URL

import config from '@/config/config.js';
Vue.prototype.$systemConfig = config
Vue.config.productionTip = false

// Vue.prototype.$config = $config

// Vue.prototype.$dbcmd = uniCloud.database().command;
// Vue.prototype.$func = $func
Vue.prototype.$store = $store

App.mpType = 'app'

const app = new Vue({
	...App
})

app.$mount()
